package cn.liangent.travlib;

public class CompleteResourceData extends ResourceData {
	private int cropConsumption;

	public CompleteResourceData(int lumber, int clay, int iron, int crop, int cropConsumption) {
		super(lumber, clay, iron, crop);
		this.cropConsumption = cropConsumption;
	}

	public int getCropConsumption() {
		return cropConsumption;
	}

	@SuppressWarnings("unchecked")
	public CompleteResourceData calculateProduct(long time, CompleteResourceData production, ResourceData warehouse) {
		CompleteResourceData retv = (CompleteResourceData)(super.calculateProduct(time, production, warehouse));
		retv.cropConsumption = this.cropConsumption;
		return retv;
	}
}
